Skip to content

docs: add the org Integrations UI walkthrough for webhooks [OD-702] - #2758

Open
claudiacodacy wants to merge 1 commit into
docs-webhooks-api-only-od-702from
docs-add-webhooks-documentation-od-702
Open

claudiacodacy wants to merge 1 commit into
docs-webhooks-api-only-od-702from
docs-add-webhooks-documentation-od-702

Conversation

@claudiacodacy

@claudiacodacy claudiacodacy commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the second half of the original webhooks documentation PR, split so we can ship the API-only page this week (see #2767) while the org Integrations UI (OD-697, OD-699, OD-701, OD-709) is still being built. Merge this once the UI ships, after #2767 is merged into master and this branch is rebased onto it.

Review history

The two wire-contract corrections raised in review on the original PR are already applied (on #2767, inherited here):

  • M1 wire contract update (outbound-hooks#15, codacy-events#260): dropped X-Codacy-Timestamp, moved timestamp into the signed body as ISO 8601, added the status field.
  • Delivery behavior: documented the real retry behavior (5xx/timeout retries up to 2 more times at 200 ms/400 ms, 4xx drops immediately, retries reuse X-Codacy-Delivery).

Test plan

  • mkdocs build --strict passes with no warnings
  • vale docs/organizations/integrations/webhooks.md — clean except the pre-existing repo-wide em dash spacing style (Microsoft.Dashes), advisory
  • Diff against base (docs: add webhooks documentation (API only) [OD-702] #2767) reviewed by eye — UI-only delta

🤖 Generated with Claude Code

@claudiacodacy
claudiacodacy requested a review from a team as a code owner September 24, 2026 09:03
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Overall readability score: 54.21 (🟢 +0)

File Readability
webhooks.md 68.54 (🟢 +0.01)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
webhooks.md 68.54 47.38 8.65 10.1 10.73 6.64
  🟢 +0.01 🔴 -0.21 🟢 +0.07 🔴 -0.1 🔴 -0.18 🟢 +0.1

Averages:

  Readability FRE GF ARI CLI DCRS
Average 54.21 43.01 10.9 12.33 12.27 7.99
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

@github-actions
github-actions Bot temporarily deployed to Netlify September 24, 2026 09:04 Inactive
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The webhook verification documentation allows replay of captured valid deliveries because the timestamp and delivery ID are not covered by the signature and replay handling is not defined. This security gap should be addressed before merging.

The strict MkDocs build and several acceptance criteria remain unverified because no build artifact or automated test evidence is included. Codacy is up to standards; no uncovered complex files were reported.

Test suggestions

  • Strict MkDocs build validates the new page and navigation entry without warnings.
  • Documentation covers adding, deleting, endpoint limits, permissions, HTTPS validation, and signing-secret lifecycle.
  • Documentation accurately describes branch and pull request event payloads and delivery conditions.
  • Documentation accurately describes headers, HMAC-SHA256 verification, timeout, retry, and deduplication behavior.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Strict MkDocs build validates the new page and navigation entry without warnings.
2. Documentation covers adding, deleting, endpoint limits, permissions, HTTPS validation, and signing-secret lifecycle.
3. Documentation accurately describes branch and pull request event payloads and delivery conditions.
4. Documentation accurately describes headers, HMAC-SHA256 verification, timeout, retry, and deduplication behavior.
Low confidence findings
  • Validate the documented endpoint-management flow against the shipped UI before relying on it as the authoritative guide.
  • Add or link automated evidence that mkdocs build --strict completes without warnings.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback


1. Compute the HMAC-SHA256 hash of the raw request body, using the endpoint's signing secret as the key.
1. Hex-encode the hash and prefix it with `sha256=`.
1. Compare the result to the `X-Codacy-Signature` header using a constant-time comparison, and reject the delivery if they don't match.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

This verification flow permits replay of a captured, valid delivery. Include the timestamp and delivery ID in the signed material, or explicitly require consumers to deduplicate X-Codacy-Delivery values and document that the timestamp cannot be trusted for freshness unless it is covered by the signature. Define the exact HMAC input, require constant-time signature comparison, and explain rejection of duplicate delivery IDs and stale requests.

@github-actions
github-actions Bot temporarily deployed to Netlify September 24, 2026 09:12 Inactive
@github-actions
github-actions Bot temporarily deployed to Netlify September 24, 2026 09:28 Inactive
@andrzej-janczak

Copy link
Copy Markdown
Contributor

Heads-up: the M1 wire contract changed after this was approved (outbound-hooks#15, codacy-events#260):

  • X-Codacy-Timestamp header removed. The HMAC signs only the body, so an unsigned timestamp header could be replayed or altered without detection.
  • Body timestamp is now an ISO 8601 UTC string, second precision (e.g. "2025-09-17T23:00:00Z"), not unix seconds. It is inside the signed body.
  • New body field status: success, partial_success or failure. Webhooks now fire for failed analyses too.
    Please update the headers table, both JSON examples and the timestamp bullet before merging.

Copy link
Copy Markdown
Contributor Author

amazing

@andrzej-janczak

Copy link
Copy Markdown
Contributor

In "Delivery behavior", please also note that Codacy retries a 5xx or a timeout up to 2 more times (200 ms, 400 ms delay) before giving up; only a 4xx drops immediately, without retry. A retry reuses the same X-Codacy-Delivery value, so integrators should dedupe on X-Codacy-Delivery for retries and on commitSha for reanalysis. Matches outbound-hooks#15.

@github-actions
github-actions Bot temporarily deployed to Netlify September 28, 2026 11:14 Inactive
@claudiacodacy
claudiacodacy force-pushed the docs-add-webhooks-documentation-od-702 branch from 22e08dd to 3411b56 Compare September 28, 2026 11:17
@claudiacodacy claudiacodacy changed the title docs: add webhooks documentation [OD-702] docs: add the org Integrations UI walkthrough for webhooks [OD-702] Sep 28, 2026
@claudiacodacy
claudiacodacy changed the base branch from master to docs-webhooks-api-only-od-702 September 28, 2026 11:17
@claudiacodacy

Copy link
Copy Markdown
Contributor Author

Addressed both, on #2767 (the wire-contract content, inherited here):

  • Wire contract: dropped `X-Codacy-Timestamp`, moved `timestamp` into the signed body as ISO 8601 (`2025-09-17T23:00:00Z`), added `status` (`success`/`partial_success`/`failure`).
  • Delivery behavior: `5xx`/timeout retries up to 2 more times (200 ms, 400 ms), `4xx` drops immediately, retries reuse `X-Codacy-Delivery`.

Also split this PR in two: #2767 ships the API-only page this week (org Integrations UI isn't built yet), and this PR now carries just the UI walkthrough on top, to merge once the UI ships.

@github-actions
github-actions Bot temporarily deployed to Netlify September 28, 2026 11:18 Inactive
@andrzej-janczak

Copy link
Copy Markdown
Contributor

Update to the retry timing (outbound-hooks#24): a 5xx or timeout is now retried with exponential backoff, about 1 s then 2 s (with jitter), still 3 attempts in total; a 4xx is not retried. Please use these numbers instead of 200 ms / 400 ms.

@claudiacodacy
claudiacodacy force-pushed the docs-add-webhooks-documentation-od-702 branch from 3411b56 to 694e068 Compare September 29, 2026 13:05
@claudiacodacy
claudiacodacy force-pushed the docs-webhooks-api-only-od-702 branch from 8d9b516 to 5d8fb7e Compare September 29, 2026 13:05
@github-actions
github-actions Bot temporarily deployed to Netlify September 29, 2026 13:06 Inactive
@andrzej-janczak

Copy link
Copy Markdown
Contributor

Correction to my previous note: the retry delays are about 1 s then 5 s (exponential factor 5, with jitter), still 3 attempts in total; a 4xx is not retried.

Restacks on #2767 (the API-only release for this week) and adds the
org Integrations > Webhooks UI: the Add endpoint flow, the one-time
signing-secret card, the endpoint list, and the upgrade prompt shown
when the organization isn't entitled. Merge once the UI ships
(OD-697, OD-699, OD-701, OD-709).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Netlify — 0afd3855 Deployed Sep 29, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants